import React from 'react';
import * as PropTypes from 'prop-types'

import {Util} from '..';
import {MapContext} from '../Context';

class Controls extends React.Component {
  static defaultProps = {

  };
  constructor(props) {
    super(props);
    this.state = {

    };
    this.options = {
      attribution  : undefined,
      attributionOptions: undefined,
      rotate: undefined,
      rotateOptions: undefined,
      zoom: undefined,
      zoomOptions: undefined
    }
  }

  componentDidMount() {
    this.init();
  }

  init = () => {
    Util.updateOptions(this.options,this.props)
  };

  render() {
    return (
      <div >
        {this.props.children}
      </div>
    );
  }
}
Controls.propTypes = {

}
Controls.contextType = MapContext;
export default Controls;

